import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'at_auth_plugin_method_channel.dart';

abstract class AtAuthPluginPlatform extends PlatformInterface {
  AtAuthPluginPlatform() : super(token: _token);

  static final Object _token = Object();
  static AtAuthPluginPlatform _instance = MethodChannelAtAuthPlugin();

  static AtAuthPluginPlatform get instance => _instance;

  static set instance(AtAuthPluginPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  Future<Map<String, dynamic>> setAuthSDKInfo(String appSecret) {
    throw UnimplementedError('setAuthSDKInfo() has not been implemented.');
  }

  Future<Map<String, dynamic>> getLoginToken() {
    throw UnimplementedError('getLoginToken() has not been implemented.');
  }

  Future<String> getVersion() {
    throw UnimplementedError('getVersion() has not been implemented.');
  }

  /// 🔹 新增：监听登录事件（多次回调）
  Stream<Map<String, dynamic>> get loginStream {
    throw UnimplementedError('loginStream has not been implemented.');
  }
}
